package com.class09;

import java.sql.SQLOutput;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/1 17:06
 */
public class UserTest {
    User user;
    public static void main(String[] args) {
        User user = new User();


        System.out.println(user.age);
        User user1 = new User("yxy");
        user1.age = 20;
        System.out.println(user1.age);
        System.out.println(user1.name);
    }


}

class User {
    //    属性（实例变量）
    String name;
    int age = 10;
     User(){

    }
    public User(String n) {
         name = n;
    }
}
